#ifndef CUSTOMCOMMANDTHREAD_H
#define CUSTOMCOMMANDTHREAD_H

#include "framewindow.h"
#include "serialportsmanager.h"
#include <QObject>
#include <QThread>

class CustomCommandThread : public QThread
{


    Q_OBJECT

public:

    QMap<QString,SerialPortsManager*> *COMMap;
    explicit  CustomCommandThread(FrameWindow *frameWindow);
    ~CustomCommandThread();

    virtual void run();

    int init();

public:
    int dealData(QString COM, ATCommandItem comm, QByteArray rec);
signals:

    //向主线程发送发出的数据
    void sendData(QString COM, QString  data);//向主线程发送接收到的串口数据
    //向主线程发送接收到的串口数据
    void sendCustomResult(QString COM,QString rev,int result);


public slots:



private:
    FrameWindow *parent;

     int dealData(int index,QString  send,QByteArray rec);
};

#endif // CUSTOMCOMMANDTHREAD_H
